package com.miyu.openfeign.controller;

import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.miyu.openfeign.service.openService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class openController {

    @Autowired
    private openService os;

    @RequestMapping("/book/test")
    public String test (){
        String str = os.test();
        return str;
    }

    @RequestMapping("/bookMagic/searchBook")
    public JSONArray query (@RequestBody JSONObject param){
        System.out.println(param);
        JSONArray rs = os.searchBook(param);
        return null;
    }

}
